/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mx.itschapala.dsw2.EventosA.modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author User
 */
@Entity
@Table(name = "confirmacion")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Confirmacion.findAll", query = "SELECT c FROM Confirmacion c"),
    @NamedQuery(name = "Confirmacion.findByIdConfirmacion", query = "SELECT c FROM Confirmacion c WHERE c.idConfirmacion = :idConfirmacion"),
    @NamedQuery(name = "Confirmacion.findByAsistire", query = "SELECT c FROM Confirmacion c WHERE c.asistire = :asistire"),
    @NamedQuery(name = "Confirmacion.findByClave", query = "SELECT c FROM Confirmacion c WHERE c.clave = :clave")})
public class Confirmacion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idConfirmacion")
    private Integer idConfirmacion;
    @Size(max = 45)
    @Column(name = "asistire")
    private String asistire;
    @Size(max = 45)
    @Column(name = "clave")
    private String clave;
    @OneToOne(cascade = CascadeType.ALL, mappedBy = "confirmacion")
    private Information information;

    public Confirmacion() {
    }

    public Confirmacion(Integer idConfirmacion) {
        this.idConfirmacion = idConfirmacion;
    }

    public Integer getIdConfirmacion() {
        return idConfirmacion;
    }

    public void setIdConfirmacion(Integer idConfirmacion) {
        this.idConfirmacion = idConfirmacion;
    }

    public String getAsistire() {
        return asistire;
    }

    public void setAsistire(String asistire) {
        this.asistire = asistire;
    }

    public String getClave() {
        return clave;
    }

    public void setClave(String clave) {
        this.clave = clave;
    }

    public Information getInformation() {
        return information;
    }

    public void setInformation(Information information) {
        this.information = information;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idConfirmacion != null ? idConfirmacion.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Confirmacion)) {
            return false;
        }
        Confirmacion other = (Confirmacion) object;
        if ((this.idConfirmacion == null && other.idConfirmacion != null) || (this.idConfirmacion != null && !this.idConfirmacion.equals(other.idConfirmacion))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "mx.itschapala.dsw2.EventosA.modelo.Confirmacion[ idConfirmacion=" + idConfirmacion + " ]";
    }
    
}
